#ifndef NODE_H
#define NODE_H

#include <QString>
#include <QColor>
#include <QTime>

class Node {
public:
    Node(const QString &id, const QString &address, quint16 port, const QColor & paintColor);

    const QString & getId() const { return id; }

    const QString & getAddress() const { return address; }

    const QColor & getPaintColor() const { return paintColor; }

    quint16 getPort() const { return port; }

    const QTime & getLastSeenTime() const { return lastSeenTime; }

    void updateLastSeenTime();

    bool operator ==(const Node &b) const;

    static QString generateUniqueId();
private:
    QString id;
    QString address;
    quint16 port;
    QColor paintColor;
    QTime lastSeenTime;
};

#endif // NODE_H
